package com.quick.admin.web;

import com.quick.common.result.ResultEntity;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：chicunxiang
 * @date ：Created in 2021/1/26 09:10
 * @description：
 * @version: 1.0
 */
@RestController
@RequestMapping("/admin")
public class UserController {


    @RequiresPermissions("*")
    @GetMapping("test")
    public ResultEntity<String> test() {
        return ResultEntity.ok("1234567");
    }

    @RequiresPermissions("auth:test2")
    @GetMapping("test1")
    public ResultEntity<String> test1() {
        return ResultEntity.ok("asfghkjjn");
    }

    @RequiresPermissions("auth:test1")
    @GetMapping("test2")
    public ResultEntity<String> test2() {
        return ResultEntity.ok("test2");
    }

}
